import request from './request'

export function statisticsProduct ({currentPage = 1, perPage = 10,productType,productName, categoryNo} = {}) {
  return request({
    url: '/console/statement/statisticsProduct.do',
    method: 'POST',
    body: {currentPage, perPage,productType,productName, categoryNo}
  })
}
export function statisticsAmt ({currentPage = 1, perPage = 10,productName, categoryNo, startDate, endDate} = {}) {
  return request({
    url: '/console/statement/statisticsAmt.do',
    method: 'POST',
    body: {currentPage, perPage,productName, categoryNo, startDate, endDate}
  })
}

export function statisticsTotalProduct ({currentPage = 1, perPage = 10,productType,productName, categoryNo} = {}) {
  return request({
    url: '/console/statement/statisticsTotalProduct.do',
    method: 'POST',
    body: {currentPage, perPage,productType,productName, categoryNo}
  })
}
export function statisticsTotalAmt ({currentPage = 1, perPage = 10,productName, categoryNo, startDate, endDate} = {}) {
  return request({
    url: '/console/statement/statisticsTotalAmt.do',
    method: 'POST',
    body: {currentPage, perPage,productName, categoryNo, startDate, endDate}
  })
}

// 导出
// export function TotalProductExport ({currentPage = 1, perPage = 10,productType,productName, categoryNo} = {}) {
//   return request({
//     url: '/console/statement/statisticsTotalProductExport.do',
//     method: 'POST',
//     responseType: 'blob',
//     body: {currentPage, perPage,productType,productName, categoryNo}
//   })
// }
// 优惠券报表
export function getCouponReport ({currentPage = 1, perPage = 10} = {}) {
  return request({
    url: '/console/coupon/getCouponReport.do',
    method: 'POST',
    body: {currentPage, perPage}
  })
}

export function getCouponDetail (couponId) {
  return request({
    url: '/console/coupon/getDetailsReport.do',
    method: 'POST',
    body: {couponId}
  })
}

// 日志管理
export function getLogList ({currentPage = 1, perPage = 10,userName, startTime, endTime} = {}) {
  return request({
    url: '/system/log/logList.do',
    method: 'POST',
    body: {currentPage, perPage,userName, startTime, endTime}
  })
}
// 员工消费报表
export function staffReport ({currentPage = 1, perPage = 10,companyNo,userName,staffNo,phone, startDate,endDate,transTimeType} = {}) {
  return request({
    url: '/company/queryUserAccountTransferDetailListPage.do',
    method: 'POST',
    body: {currentPage, perPage,companyNo,userName,staffNo,phone, startDate,endDate,transTimeType}
  })
}
// 企业消费报表
export function compReport ({currentPage = 1, perPage = 10,companyNo,startDate,endDate,transTimeType} = {}) {
  return request({
    url: '/company/queryCompanyAccountTransferDetailListPage.do',
    method: 'POST',
    body: {currentPage, perPage,companyNo,startDate,endDate,transTimeType}
  })
}

// 企业充值员工记录
export function compTransferReport ({currentPage = 1, perPage = 10,companyNo,startDate,endDate,transTimeType,name,staffNo} = {}) {
  return request({
    url: '/company/companyAccountTransferStaffListPage.do',
    method: 'POST',
    body: {currentPage, perPage,companyNo,startDate,endDate,transTimeType,name,staffNo}
  })
}

// 营业员操作 列表
export function queryStoreUser ({currentPage = 1, perPage = 10} = {}) {
  return request({
    url: '/store/queryStoreUserApplyListPage.do',
    method: 'POST',
    body: {currentPage, perPage}
  })
}

// 店员审核操作接口
export function operation ({applyNo, status} = {}) {
  return request({
    url: '/store/operationStoreUser.do',
    method: 'POST',
    body: {applyNo, status}
  })
}

// 线下核销优惠券列表
export function queryVerification({currentPage = 1, perPage = 10} = {}) {
  return request({
    url: '/verification/queryVerificationCouponListPage.do',
    method: 'POST',
    body: {currentPage, perPage}
  })
}

// 投诉留言列表
export function complainInfoList({currentPage = 1, perPage = 10} = {}) {
  return request({
    url: '/complain/queryComplainInfoListPage.do',
    method: 'POST',
    body: {currentPage, perPage}
  })
}

// 投诉留言操作
export function operationComplain ({complainNo} = {}) {
  return request({
    url: '/complain/operationComplainInfo.do',
    method: 'POST',
    body: {complainNo}
  })
}

